import request from '@/utils/request'

// 获取医生类型列表
export function getDoctorType() {
  return request({
    url: '/app/doctor/type',
    method: 'get'
  })
}

// 获取医生列表
export function getDoctorList(data: any) {
  return request({
    url: '/app/doctor/doctorList',
    method: 'get',
      params: data
  })
}

// 获取医生详情
export function getDoctorDetail(doctorId: number) {
  return request({
    url: `/app/doctor/detail/${doctorId}`,
    method: 'get'
  })
}

// 根据科室获取医生列表
export function getDoctorsByDepartment(departmentId: number) {
  return request({
    url: `/app/doctor/department/${departmentId}`,
    method: 'get'
  })
}

// 获取医生排班
export function getDoctorSchedule(doctorId: number) {
  return request({
    url: `/app/doctor/doctorSchedule/${doctorId}`,
    method: 'get'
  })
}

// 设置医生专家类型
export function setDoctorType(doctorId: number, typeId: number) {
  return request({
    url: '/app/doctor/setDoctorType',
    method: 'post',
    params: {
      doctorId,
      typeId
    }
  })
}
